package com.bt7274.controller;

import com.bt7274.grace.result.GraceJSONResult;
import com.bt7274.pojo.bo.ActivityRecordBO;
import com.bt7274.pojo.vo.ActivityRecordVO;
import com.bt7274.service.ActivityRecordService;
import com.bt7274.utils.PageResponse;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: bt7274-back
 * @BelongsPackage: com.bt7274.controller
 * @Author: Galland
 * @CreateTime: 2025-06-04
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("/api/activity-record")
@RequiredArgsConstructor
public class ActivityRecordController {

    private final ActivityRecordService activityRecordService;



    /**
     * 获取活动参与统计
     */
    @GetMapping("/stats/{promotionId}")
    public GraceJSONResult getParticipantCount(@PathVariable String promotionId) {
        Long count = activityRecordService.getParticipantCount(promotionId);
        return GraceJSONResult.ok(count);
    }
}


